#pragma once

#include <memory>
#include <mutex>
#include "json.h"

class DigitalSignageManager{
public:
    using Ptr = std::shared_ptr<DigitalSignageManager>; 
    static Ptr Instance();
    DigitalSignageManager();

    ~DigitalSignageManager();

    void RegistRPC();
private:
    bool CloudUploadStream(const Json::Value& req_params, Json::Value& res_result, std::string& errinfo, int& errorCode);
    bool DigitalSignage(const Json::Value& req_params, Json::Value& res_result, std::string& errinfo, int& errorCode);
    bool bgmPlay(const Json::Value& req_params, Json::Value& res_result, std::string& errinfo);
    bool processDownFile(std::string url, std::string resmd5, std::string subPath, std::string filename);
    bool compareMd5(std::string filename, const char *md5);
};